linux: Use old-mode of save/restore for uniproc guests (it's faster).
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Fri, 2 Mar 2007 16:00:22 +0000 (16:00 +0000)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Fri, 2 Mar 2007 16:00:22 +0000 (16:00 +0000)
Signed-off-by: Keir Fraser <keir@xensource.com>
linux-2.6-xen-sparse/drivers/xen/core/machine_reboot.c

index d8667b336a0ca14e21a40601fe785db270917a83..ad6e4c54a5e838ad19eaf086de078b57d145fc67 100644 (file)
@@ -210,6 +210,10 @@ int __xen_suspend(int fast_suspend)
        }
 #endif
 
+       /* If we are definitely UP then 'slow mode' is actually faster. */
+       if (num_possible_cpus() == 1)
+               fast_suspend = 0;
+
        if (fast_suspend) {
                xenbus_suspend();
                err = stop_machine_run(take_machine_down, &fast_suspend, 0);